#!/usr/bin/env python
#####################################
# Installation module for FuzzBunch (on Wine)
#####################################

# AUTHOR OF MODULE NAME
AUTHOR="Mike Schladt (@mikeschladt). Tool by Miguel Diaz Lira (mdiazcl)"

# DESCRIPTION OF THE MODULE
DESCRIPTION="This module will install FuzzBunch on Wine"

# PREREQ INSTALL MODULES NEEDED FOR THIS TOOL TO WORK PROPERLY
TOOL_DEPEND=""

# INSTALL TYPE GIT, SVN, FILE DOWNLOAD
# OPTIONS = GIT, SVN, FILE
INSTALL_TYPE="GIT"

# LOCATION OF THE FILE OR GIT/SVN REPOSITORY
REPOSITORY_LOCATION="https://github.com/mdiazcl/fuzzbunch-debian.git"

# WHERE DO YOU WANT TO INSTALL IT
INSTALL_LOCATION="fuzzbunch"

# DEPENDS FOR DEBIAN INSTALLS
DEBIAN="git,wine"

# DEPENDS FOR FEDORA INSTALLS
FEDORA="git,wine,winbind,winetricks"

# COMMANDS TO RUN AFTER
AFTER_COMMANDS='WINEPREFIX="$HOME/.wine-fuzzbunch", su - $SUDO_USER -c "WINEARCH=win32; wine wineboot; export WINEPREFIX=$HOME/.wine-fuzzbunch; wine reg ADD \"HKEY_CURRENT_USER\\Environment\" /v Path /t REG_SZ /d \"c:\\windows;c:\\windows\\system;C:\\Python26;C:\\fuzzbunch-debian\\windows\\fuzzbunch\";winetricks python26;cp -R {INSTALL_LOCATION} $HOME/.wine-fuzzbunch/drive_c/fuzzbunch-debian", echo "#!/usr/bin/env bash" > {INSTALL_LOCATION}fuzzbunch.sh, echo "export WINEPREFIX=$HOME/.wine-fuzzbunch" >> {INSTALL_LOCATION}fuzzbunch.sh, echo "wine cmd.exe /C python C:\\\\fuzzbunch-debian\\\\windows\\\\fb.py" >> {INSTALL_LOCATION}fuzzbunch.sh, chmod 755 {INSTALL_LOCATION}fuzzbunch.sh'

# THIS WILL CREATE AN AUTOMATIC LAUNCHER FOR THE TOOL
LAUNCHER="fuzzbunch"
